import request from '@/utils/request'

// 查询kong配置信息列表
export function listProfile(query) {
  return request({
    url: '/kong/param/profile/list',
    method: 'get',
    params: query
  })
}

// 查询kong配置信息详细
export function getProfile(id) {
  return request({
    url: '/kong/param/profile/' + id,
    method: 'get'
  })
}

// 新增kong配置信息
export function addProfile(data) {
  return request({
    url: '/kong/param/profile',
    method: 'post',
    data: data
  })
}

// 修改kong配置信息
export function updateProfile(data) {
  return request({
    url: '/kong/param/profile',
    method: 'put',
    data: data
  })
}

// 删除kong配置信息
export function delProfile(id) {
  return request({
    url: '/kong/param/profile/' + id,
    method: 'delete'
  })
}

// 导出kong配置信息
export function exportProfile(query) {
  return request({
    url: '/kong/param/profile/export',
    method: 'get',
    params: query
  })
}

// 激活kong 配置信息
export function activeProfile(data){
  return request ({
    url: '/kong/active',
    method: 'post',
    data: data
  })
}
// 停止 
export function stopProfile(data){
  return request ({
    url: '/kong/stop',
    method: 'post',
    data: data
  })
}

export function getActiveProfile(){
  return request({
    url: '/kong/profile/info',
    method: 'get'
  })
}
